package service.impl;

import dao.StudentDao;
import dao.impl.StudentDaoImpl;
import entity.Student;
import service.StudentService;

public class StudentServiceImpl implements StudentService {

    public static StudentDao studentDao= new StudentDaoImpl();

    @Override
    public void addStudent(Student student) {
        // 先查询是否存在
        boolean exist = studentDao.isExist(student);
        if (exist) {
            return;
        }
        // 不存在则添加
        studentDao.addStudent(student);
    }
}
